const express=require('express')
const router= express.Router();
const db=require('../../utils/db')

router.post('/bianji',function(req,res){
      let mysql=`UPDATE user SET user_name='${req.body.name}',user_tel='${req.body.phone}',user_address='${req.body.address}',user_company='${req.body.Stores}'  WHERE user_id ='${req.body.number}'`
      db(mysql,null,function(err,data){
        if(err){
            return res.json({
                code: 500,
                msg: '修改失败，请稍后重试'
            })
        }
        res.json({
            code: 200,
            msg: '修改成功'
        })
    })
    })

module.exports = router